package com.luych.toolbox.automation.service.dao;

import com.luych.toolbox.automation.service.entity.AutoTaskHistory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Optional;

public interface AutoTaskHistoryDao extends JpaRepository<AutoTaskHistory, String>, JpaSpecificationExecutor<AutoTaskHistory> {

    Optional<AutoTaskHistory> findByName(String name);

    Page<AutoTaskHistory> findByNameLike(String name, Pageable pageable);

}